// 自定义指令
import Vue from 'vue'

// 为非表单节点实现placeholder
Vue.directive('placeholder', function(el, binding){
  var {value, arg} = binding
  if(value === ''){
    el.textContent = arg
    el.style.color = '#A9A9A9'
  }else{
    el.textContent = value
    el.style.color = ''
  }
})